Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CRE-44] Add restricted configuration; validate transformer values #15961

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

cedric-cordenier
Copy link
Contributor

This resolves CRE-44 using two distinct solutions:

  • Extending the onchain capability configuration to include the concept of RestrictedKeys and RestrictedConfig; these are keys and config fields that can't be set by workflow authors. This is useful for certain compute configuration which we might want to store onchain, eg. MaxMemoryMBs.
  • Source maximum values for MaxMemoryMBs, TickInterval and Timeout from the job spec and validate passed in values against this; this serves as a hard maximum on these values.

Copy link
Contributor

github-actions bot commented Jan 17, 2025

AER Report: CI Core

aer_workflow , commit , Clean Go Tidy & Generate , Detect Changes , Scheduled Run Frequency , GolangCI Lint (core/scripts) , GolangCI Lint (.) , GolangCI Lint (integration-tests/load) , test-scripts , Core Tests (go_core_tests) , GolangCI Lint (integration-tests) , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , GolangCI Lint (deployment) , Core Tests (go_core_fuzz) , Core Tests (go_core_race_tests) , SonarQube Scan , lint

1. Missing method in PluginFactoryConstructor:go_core_race_tests

Source of Error:
../../../go/pkg/mod/github.com/smartcontractkit/chainlink-ccip@v0.0.0-20250110181647-9dba278f2103/execute/factory.go:247:40: cannot use &PluginFactoryConstructor{} (value of type *PluginFactoryConstructor) as core.OCR3ReportingPluginClient value in variable declaration: *PluginFactoryConstructor does not implement core.OCR3ReportingPluginClient (missing method Close)

Why: The PluginFactoryConstructor does not implement the Close method required by the core.OCR3ReportingPluginClient interface.

Suggested fix: Implement the Close method in the PluginFactoryConstructor struct to satisfy the core.OCR3ReportingPluginClient interface.

2. Missing method in PluginFactoryConstructor:go_core_race_tests

Source of Error:
../../../go/pkg/mod/github.com/smartcontractkit/chainlink-ccip@v0.0.0-20250110181647-9dba278f2103/commit/factory.go:304:40: cannot use &PluginFactoryConstructor{} (value of type *PluginFactoryConstructor) as core.OCR3ReportingPluginClient value in variable declaration: *PluginFactoryConstructor does not implement core.OCR3ReportingPluginClient (missing method Close)

Why: The PluginFactoryConstructor does not implement the Close method required by the core.OCR3ReportingPluginClient interface.

Suggested fix: Implement the Close method in the PluginFactoryConstructor struct to satisfy the core.OCR3ReportingPluginClient interface.

3. Unused variables and imports:deployment

Source of Error:
deployment/ccip/changeset/cs_active_candidate_test.go:139:3: declared and not used: block (typecheck)
deployment/ccip/changeset/cs_active_candidate_test.go:193:2: declared and not used: tokenConfig (typecheck)
deployment/ccip/changeset/cs_ccip_home_test.go:34:2: declared and not used: envNodes (typecheck)
deployment/ccip/changeset/cs_ccip_home_test.go:241:4: declared and not used: tokenConfig (typecheck)
deployment/ccip/changeset/cs_ccip_home_test.go:354:4: declared and not used: tokenConfig (typecheck)
deployment/ccip/changeset/cs_active_candidate_test.go:4:2: "math/big" imported and not used (typecheck)
deployment/ccip/changeset/cs_active_candidate_test.go:23:2: "github.com/smartcontractkit/chainlink/v2/core/logger" imported and not used (typecheck)
deployment/ccip/changeset/cs_ccip_home_test.go:4:2: "math/big" imported and not used (typecheck)
deployment/ccip/changeset/cs_ccip_home_test.go:13:2: "github.com/smartcontractkit/chainlink-ccip/chainconfig" imported and not used (typecheck)
deployment/ccip/changeset/cs_ccip_home_test.go:14:2: "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" imported as cciptypes and not used (typecheck)
deployment/ccip/changeset/cs_ccip_home_test.go:22:2: "github.com/smartcontractkit/chainlink/v2/core/logger" imported and not used (typecheck)
deployment/common/changeset/set_config_mcms_test.go:36:2: declared and not used: config (typecheck)
deployment/common/changeset/example/link_transfer_test.go:35:2: declared and not used: config (typecheck)
deployment/keystone/changeset/accept_ownership_test.go:54:2: declared and not used: timelock (typecheck)
deployment/keystone/changeset/append_node_capabilities_test.go:91:3: declared and not used: contracts (typecheck)
deployment/keystone/changeset/deploy_ocr3_test.go:276:3: declared and not used: contracts (typecheck)
deployment/keystone/changeset/update_don_test.go:114:3: declared and not used: contracts (typecheck)
deployment/keystone/changeset/internal/deploy_test.go:21:3: declared and not used: registry (typecheck)
deployment/keystone/changeset/internal/deploy_test.go:91:3: declared and not used: registry (typecheck)
deployment/keystone/changeset/internal/deploy_test.go:126:3: declared and not used: registry (typecheck)

Why: The code contains variables and imports that are declared but not used, leading to typecheck errors.

Suggested fix: Remove the unused variables and imports to clean up the code and resolve the typecheck errors.

4. Missing method in PluginFactoryConstructor:go_core_tests_integration

Source of Error:
../../../go/pkg/mod/github.com/smartcontractkit/chainlink-ccip@v0.0.0-20250110181647-9dba278f2103/execute/factory.go:247:40: cannot use &PluginFactoryConstructor{} (value of type *PluginFactoryConstructor) as core.OCR3ReportingPluginClient value in variable declaration: *PluginFactoryConstructor does not implement core.OCR3ReportingPluginClient (missing method Close)

Why: The PluginFactoryConstructor does not implement the Close method required by the core.OCR3ReportingPluginClient interface.

Suggested fix: Implement the Close method in the PluginFactoryConstructor struct to satisfy the core.OCR3ReportingPluginClient interface.

5. Missing method in PluginFactoryConstructor:go_core_tests_integration

Source of Error:
../../../go/pkg/mod/github.com/smartcontractkit/chainlink-ccip@v0.0.0-20250110181647-9dba278f2103/commit/factory.go:304:40: cannot use &PluginFactoryConstructor{} (value of type *PluginFactoryConstructor) as core.OCR3ReportingPluginClient value in variable declaration: *PluginFactoryConstructor does not implement core.OCR3ReportingPluginClient (missing method Close)

Why: The PluginFactoryConstructor does not implement the Close method required by the core.OCR3ReportingPluginClient interface.

Suggested fix: Implement the Close method in the PluginFactoryConstructor struct to satisfy the core.OCR3ReportingPluginClient interface.

6. Missing method in PluginFactoryConstructor:test-scripts

Source of Error:
/home/runner/go/pkg/mod/github.com/smartcontractkit/chainlink-ccip@v0.0.0-20250110181647-9dba278f2103/execute/factory.go:247:40: cannot use &PluginFactoryConstructor{} (value of type *PluginFactoryConstructor) as core.OCR3ReportingPluginClient value in variable declaration: *PluginFactoryConstructor does not implement core.OCR3ReportingPluginClient (missing method Close)

Why: The PluginFactoryConstructor does not implement the Close method required by the core.OCR3ReportingPluginClient interface.

Suggested fix: Implement the Close method in the PluginFactoryConstructor struct to satisfy the core.OCR3ReportingPluginClient interface.

7. Missing method in PluginFactoryConstructor:test-scripts

Source of Error:
/home/runner/go/pkg/mod/github.com/smartcontractkit/chainlink-ccip@v0.0.0-20250110181647-9dba278f2103/commit/factory.go:304:40: cannot use &PluginFactoryConstructor{} (value of type *PluginFactoryConstructor) as core.OCR3ReportingPluginClient value in variable declaration: *PluginFactoryConstructor does not implement core.OCR3ReportingPluginClient (missing method Close)

Why: The PluginFactoryConstructor does not implement the Close method required by the core.OCR3ReportingPluginClient interface.

Suggested fix: Implement the Close method in the PluginFactoryConstructor struct to satisfy the core.OCR3ReportingPluginClient interface.

8. Missing method in PluginFactoryConstructor:go_core_ccip_deployment_tests

Source of Error:
../../../go/pkg/mod/github.com/smartcontractkit/chainlink-ccip@v0.0.0-20250110181647-9dba278f2103/execute/factory.go:247:40: cannot use &PluginFactoryConstructor{} (value of type *PluginFactoryConstructor) as core.OCR3ReportingPluginClient value in variable declaration: *PluginFactoryConstructor does not implement core.OCR3ReportingPluginClient (missing method Close)

Why: The PluginFactoryConstructor does not implement the Close method required by the core.OCR3ReportingPluginClient interface.

Suggested fix: Implement the Close method in the PluginFactoryConstructor struct to satisfy the core.OCR3ReportingPluginClient interface.

9. Missing method in PluginFactoryConstructor:go_core_ccip_deployment_tests

Source of Error:
../../../go/pkg/mod/github.com/smartcontractkit/chainlink-ccip@v0.0.0-20250110181647-9dba278f2103/commit/factory.go:304:40: cannot use &PluginFactoryConstructor{} (value of type *PluginFactoryConstructor) as core.OCR3ReportingPluginClient value in variable declaration: *PluginFactoryConstructor does not implement core.OCR3ReportingPluginClient (missing method Close)

Why: The PluginFactoryConstructor does not implement the Close method required by the core.OCR3ReportingPluginClient interface.

Suggested fix: Implement the Close method in the PluginFactoryConstructor struct to satisfy the core.OCR3ReportingPluginClient interface.

10. Linter error:integration-tests/load

Source of Error:
level=warning msg="[runner] Can't run linter goanalysis_metalinter: inspect: failed to load package actions: could not load export data: no export data for \"github.com/smartcontractkit/chainlink/integration-tests/actions\""
level=error msg="Running error: can't run linter goanalysis_metalinter\ninspect: failed to load package actions: could not load export data: no export data for \"github.com/smartcontractkit/chainlink/integration-tests/actions\""

Why: The linter failed to load the package actions because it could not find the export data.

Suggested fix: Ensure that the package github.com/smartcontractkit/chainlink/integration-tests/actions is correctly built and the export data is available.

11. Unused variable:integration-tests

Source of Error:
integration-tests/smoke/ccip/ccip_usdc_test.go:53:2: declared and not used: ownerChainB (typecheck)

Why: The variable ownerChainB is declared but not used in the code.

Suggested fix: Remove the unused variable ownerChainB to clean up the code and resolve the typecheck error.

12. Missing method in PluginFactoryConstructor:go_core_fuzz

Source of Error:
../../../go/pkg/mod/github.com/smartcontractkit/chainlink-ccip@v0.0.0-20250110181647-9dba278f2103/commit/factory.go:304:40: cannot use &PluginFactoryConstructor{} (value of type *PluginFactoryConstructor) as core.OCR3ReportingPluginClient value in variable declaration: *PluginFactoryConstructor does not implement core.OCR3ReportingPluginClient (missing method Close)

Why: The PluginFactoryConstructor does not implement the Close method required by the core.OCR3ReportingPluginClient interface.

Suggested fix: Implement the Close method in the PluginFactoryConstructor struct to satisfy the core.OCR3ReportingPluginClient interface.

13. Missing method in PluginFactoryConstructor:go_core_fuzz

Source of Error:
../../../go/pkg/mod/github.com/smartcontractkit/chainlink-ccip@v0.0.0-20250110181647-9dba278f2103/execute/factory.go:247:40: cannot use &PluginFactoryConstructor{} (value of type *PluginFactoryConstructor) as core.OCR3ReportingPluginClient value in variable declaration: *PluginFactoryConstructor does not implement core.OCR3ReportingPluginClient (missing method Close)

Why: The PluginFactoryConstructor does not implement the Close method required by the core.OCR3ReportingPluginClient interface.

Suggested fix: Implement the Close method in the PluginFactoryConstructor struct to satisfy the core.OCR3ReportingPluginClient interface.

14. Missing method in PluginFactoryConstructor:go_core_tests

Source of Error:
../../../go/pkg/mod/github.com/smartcontractkit/chainlink-ccip@v0.0.0-20250110181647-9dba278f2103/execute/factory.go:247:40: cannot use &PluginFactoryConstructor{} (value of type *PluginFactoryConstructor) as core.OCR3ReportingPluginClient value in variable declaration: *PluginFactoryConstructor does not implement core.OCR3ReportingPluginClient (missing method Close)

Why: The PluginFactoryConstructor does not implement the Close method required by the core.OCR3ReportingPluginClient interface.

Suggested fix: Implement the Close method in the PluginFactoryConstructor struct to satisfy the core.OCR3ReportingPluginClient interface.

15. Missing method in PluginFactoryConstructor:go_core_tests

Source of Error:
../../../go/pkg/mod/github.com/smartcontractkit/chainlink-ccip@v0.0.0-20250110181647-9dba278f2103/commit/factory.go:304:40: cannot use &PluginFactoryConstructor{} (value of type *PluginFactoryConstructor) as core.OCR3ReportingPluginClient value in variable declaration: *PluginFactoryConstructor does not implement core.OCR3ReportingPluginClient (missing method Close)

Why: The PluginFactoryConstructor does not implement the Close method required by the core.OCR3ReportingPluginClient interface.

Suggested fix: Implement the Close method in the PluginFactoryConstructor struct to satisfy the core.OCR3ReportingPluginClient interface.

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants